package cn.yx.framework.websocket;

import com.google.common.collect.Sets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.socket.handler.TextWebSocketHandler;

/**
 * Created by Administrator on 2017/7/21.
 */
public class SpringWebSocketHandler extends TextWebSocketHandler {
//    private final Set<CommunicationObserver> observers = Sets.newConcurrentHashSet();
//
//    @Autowired
//    private MessageContext mc;
//
//    @Override
//    protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {
//        Message msg = mc.parse(message.getPayload());
//
//        for (CommunicationObserver o : observers) {
//            o.packetReceived(session, msg);
//        }
//    }
}
